Hello community,
I am looking for a way to reset an attributes inherit property.
You know, you have an inherited attribute, and when you set the value of this attribute to let's say "x" for one object, then all child objects display the same value.
Now you explicitly set a different value, say "y", for a child object.
When you now look at the properties of this child object, you find that in the attributes editor for the inherited attribute the "inherit" checkbox is deactivated.
Is there a way to re-activate this checkbox via DXL?
I haven't found anything.
Karl
kabr - Thu Nov 17 09:16:42 EST 2011 |
|
Re: Attribute value inheritance SystemAdmin - Thu Nov 17 09:45:02 EST 2011
Hello Karl,
just set the value of childObject."attribute" to "" or to null, then childObject will again inherit the value from its parent.
BR
Mike
|
|
Re: Attribute value inheritance kabr - Thu Nov 17 10:04:58 EST 2011 SystemAdmin - Thu Nov 17 09:45:02 EST 2011
Hello Karl,
just set the value of childObject."attribute" to "" or to null, then childObject will again inherit the value from its parent.
BR
Mike
Thanks, Mike.
not very intuitive, is it?
Karl
|
|
Re: Attribute value inheritance SystemAdmin - Thu Nov 17 10:53:33 EST 2011 kabr - Thu Nov 17 10:04:58 EST 2011
Thanks, Mike.
not very intuitive, is it?
Karl
Well, it got more intuitive for me when I found out that the function to know whether an the attribute's value is inherited or not is called
bool hasSpecificValue({Link l|Module m|Object o}, AttrDef attrDef)
no specific value --> no value --> set value to null or "" :-)
|
|
Re: Attribute value inheritance llandale - Thu Nov 17 13:33:32 EST 2011 SystemAdmin - Thu Nov 17 10:53:33 EST 2011
Well, it got more intuitive for me when I found out that the function to know whether an the attribute's value is inherited or not is called
bool hasSpecificValue({Link l|Module m|Object o}, AttrDef attrDef)
no specific value --> no value --> set value to null or "" :-)
Seems intuitive to me since the value will be "inherited" unless it actually has one, so you can force it to inherit by erasing the value. In DXL that would be: obj.NameAttr = "".
hasSpecificValue also applies to "defaulted" values.
If an attr-def both defaults and inherits and some object has a value displayed but no hasSpecificValue, I'm not sure how to tell whether its Defaulted or Inherited, without looking eleswhere.
|
|
Re: Attribute value inheritance SystemAdmin - Thu Nov 17 14:06:39 EST 2011 llandale - Thu Nov 17 13:33:32 EST 2011
Seems intuitive to me since the value will be "inherited" unless it actually has one, so you can force it to inherit by erasing the value. In DXL that would be: obj.NameAttr = "".
hasSpecificValue also applies to "defaulted" values.
If an attr-def both defaults and inherits and some object has a value displayed but no hasSpecificValue, I'm not sure how to tell whether its Defaulted or Inherited, without looking eleswhere.
I really had a problem when a user wanted an attribute of a child object that had a default and was inherited to be "empty".
Since then I am convinced that Defaults for attributes belong to the dark side of the Force....
|
|
Re: Attribute value inheritance llandale - Thu Nov 17 14:47:09 EST 2011 SystemAdmin - Thu Nov 17 14:06:39 EST 2011
I really had a problem when a user wanted an attribute of a child object that had a default and was inherited to be "empty".
Since then I am convinced that Defaults for attributes belong to the dark side of the Force....
I don't think you can inherit an "empty" value; but perhaps it was a tab or a space and you couldn't see it.
"inherit" has precedence over "default". In which case an obj-attr value would be default only when it and all of its ancestors have no specific value.
|
|
Re: Attribute value inheritance SystemAdmin - Thu Nov 17 16:26:40 EST 2011
Attribute Inheritance - a dangerous feature. This burnt me once and have avoided using it ever since. I assumed that a value that I had set at the top of an inheritance tree had rippled all the way down to the last leaf objects. I was wrong - someone had set a specific value half way down the tree and we ended up committing to a large bunch of requirements that we were going to defer to a later release. I'm still waiting to have certain parts of my body returned - treat this feature with care.
Paul Miller
Melbourne, Australia
|
|
Re: Attribute value inheritance llandale - Thu Nov 17 16:40:18 EST 2011 SystemAdmin - Thu Nov 17 16:26:40 EST 2011
Attribute Inheritance - a dangerous feature. This burnt me once and have avoided using it ever since. I assumed that a value that I had set at the top of an inheritance tree had rippled all the way down to the last leaf objects. I was wrong - someone had set a specific value half way down the tree and we ended up committing to a large bunch of requirements that we were going to defer to a later release. I'm still waiting to have certain parts of my body returned - treat this feature with care.
Paul Miller
Melbourne, Australia
Yes. It has the meaning "those below me have this default value", not "those below me have this value". That would be the hidden "dictatorship" property.
|
|